package com.prs.crm.domain.crm;

import java.util.Date;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cascade;

import com.prs.crm.domain.Attachment;
import com.prs.crm.domain.BaseEntity;

@Entity
@Table(name="crm_linkman")
public class Linkman extends BaseEntity{
	
	private static final long serialVersionUID = 1L;
	
	@Id@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Integer id;
	private String name;
	private String sex;
	private Date birthday;
	private String dept;
	private String role;
	private String officePhone;
	private String homePhone;
	private String fax;
	@ManyToOne
	private Customer customer;  //所属客户
	@ManyToOne
	private CustomerAgent customerAgent;  //所属代理商
	@ManyToOne 
	private CustomerSupplier customerSupplier;//所属供应商
	
	private String mobileNo1;
	private String mobileNo2;
	private String email;
	private String QQ_No;
	private String MSN_No;
	private String address;
	private String postcode;
	private String degree;
	@Lob
	private String specialty;
	private String college;
	private String nativePlace;
	private String nation;
	private String stature;
	private String weight;
	private String shoes;
	private String isSmoke;
	private String smokeBrand;
	private String isDrink;
	private String drinkBrand;
	private String isTea;
	private String teaBrand;
	private String dieteticRestraint;
	private String hx;
	private String isDriverLicense;
	private String isPrivateCar;
	private String carModels;
	private String carNumber;
	@Lob
	private String features;
	@Lob
	private String hobbies;
	@Lob
	private String remark;
	@ManyToOne(fetch=FetchType.LAZY)
	@Cascade({org.hibernate.annotations.CascadeType.ALL,org.hibernate.annotations.CascadeType.DELETE_ORPHAN})
	private Attachment attach;
	private String isMahjong;
	private String ante;
	private String state;
	@Column(name="linkman_file")
	private String linkman_file;
	//跟单
	@OneToMany(fetch=FetchType.LAZY,mappedBy="linkman1")
	private Set<DocumenTary> documenTarys;
	
	
	public Set<DocumenTary> getDocumenTarys() {
		return documenTarys;
	}
	public void setDocumenTarys(Set<DocumenTary> documenTarys) {
		this.documenTarys = documenTarys;
	}
	public String getLinkman_file() {
		return linkman_file;
	}
	public void setLinkman_file(String linkmanFile) {
		linkman_file = linkmanFile;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public Date getBirthday() {
		return birthday;
	}
	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	public String getDept() {
		return dept;
	}
	public void setDept(String dept) {
		this.dept = dept;
	}
	public String getRole() {
		return role;
	}
	public void setRole(String role) {
		this.role = role;
	}
	public String getOfficePhone() {
		return officePhone;
	}
	public void setOfficePhone(String officePhone) {
		this.officePhone = officePhone;
	}
	public String getHomePhone() {
		return homePhone;
	}
	public void setHomePhone(String homePhone) {
		this.homePhone = homePhone;
	}
	public String getFax() {
		return fax;
	}
	public void setFax(String fax) {
		this.fax = fax;
	}
	public Customer getCustomer() {
		return customer;
	}
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	public String getMobileNo1() {
		return mobileNo1;
	}
	public void setMobileNo1(String mobileNo1) {
		this.mobileNo1 = mobileNo1;
	}
	public String getMobileNo2() {
		return mobileNo2;
	}
	public void setMobileNo2(String mobileNo2) {
		this.mobileNo2 = mobileNo2;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getQQ_No() {
		return QQ_No;
	}
	public void setQQ_No(String qQNo) {
		QQ_No = qQNo;
	}
	public String getMSN_No() {
		return MSN_No;
	}
	public void setMSN_No(String mSNNo) {
		MSN_No = mSNNo;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getPostcode() {
		return postcode;
	}
	public void setPostcode(String postcode) {
		this.postcode = postcode;
	}
	public String getDegree() {
		return degree;
	}
	public void setDegree(String degree) {
		this.degree = degree;
	}
	public String getSpecialty() {
		return specialty;
	}
	public void setSpecialty(String specialty) {
		this.specialty = specialty;
	}
	public String getCollege() {
		return college;
	}
	public void setCollege(String college) {
		this.college = college;
	}
	public String getNativePlace() {
		return nativePlace;
	}
	public void setNativePlace(String nativePlace) {
		this.nativePlace = nativePlace;
	}
	public String getNation() {
		return nation;
	}
	public void setNation(String nation) {
		this.nation = nation;
	}
	public String getStature() {
		return stature;
	}
	public void setStature(String stature) {
		this.stature = stature;
	}
	public String getWeight() {
		return weight;
	}
	public void setWeight(String weight) {
		this.weight = weight;
	}
	public String getShoes() {
		return shoes;
	}
	public void setShoes(String shoes) {
		this.shoes = shoes;
	}
	public String getIsSmoke() {
		return isSmoke;
	}
	public void setIsSmoke(String isSmoke) {
		this.isSmoke = isSmoke;
	}
	public String getSmokeBrand() {
		return smokeBrand;
	}
	public void setSmokeBrand(String smokeBrand) {
		this.smokeBrand = smokeBrand;
	}
	public String getIsDrink() {
		return isDrink;
	}
	public void setIsDrink(String isDrink) {
		this.isDrink = isDrink;
	}
	public String getDrinkBrand() {
		return drinkBrand;
	}
	public void setDrinkBrand(String drinkBrand) {
		this.drinkBrand = drinkBrand;
	}
	public String getIsTea() {
		return isTea;
	}
	public void setIsTea(String isTea) {
		this.isTea = isTea;
	}
	public String getTeaBrand() {
		return teaBrand;
	}
	public void setTeaBrand(String teaBrand) {
		this.teaBrand = teaBrand;
	}
	public String getDieteticRestraint() {
		return dieteticRestraint;
	}
	public void setDieteticRestraint(String dieteticRestraint) {
		this.dieteticRestraint = dieteticRestraint;
	}
	public String getHx() {
		return hx;
	}
	public void setHx(String hx) {
		this.hx = hx;
	}
	public String getIsDriverLicense() {
		return isDriverLicense;
	}
	public void setIsDriverLicense(String isDriverLicense) {
		this.isDriverLicense = isDriverLicense;
	}
	public String getIsPrivateCar() {
		return isPrivateCar;
	}
	public void setIsPrivateCar(String isPrivateCar) {
		this.isPrivateCar = isPrivateCar;
	}
	public String getCarModels() {
		return carModels;
	}
	public void setCarModels(String carModels) {
		this.carModels = carModels;
	}
	public String getCarNumber() {
		return carNumber;
	}
	public void setCarNumber(String carNumber) {
		this.carNumber = carNumber;
	}
	public String getFeatures() {
		return features;
	}
	public void setFeatures(String features) {
		this.features = features;
	}
	public String getHobbies() {
		return hobbies;
	}
	public void setHobbies(String hobbies) {
		this.hobbies = hobbies;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}
	public void setIsMahjong(String isMahjong) {
		this.isMahjong = isMahjong;
	}
	public String getIsMahjong() {
		return isMahjong;
	}
	public void setAnte(String ante) {
		this.ante = ante;
	}
	public String getAnte() {
		return ante;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getState() {
		return state;
	}
	public void setAttach(Attachment attach) {
		this.attach = attach;
	}
	public Attachment getAttach() {
		return attach;
	}
	public CustomerAgent getCustomerAgent() {
		return customerAgent;
	}
	public void setCustomerAgent(CustomerAgent customerAgent) {
		this.customerAgent = customerAgent;
	}
	public CustomerSupplier getCustomerSupplier() {
		return customerSupplier;
	}
	public void setCustomerSupplier(CustomerSupplier customerSupplier) {
		this.customerSupplier = customerSupplier;
	}
	
}
